const state = {
  parmas: {}
}
const mutations = {
  SET_PARAMS: (state, parmas) => {
    state.parmas = parmas
  },
  DEL_PARAMS: (state) => {
    state.parmas = {}
  }
}
const actions = {
  setParmas({ commit }, parmas) {
    return new Promise((resolve) => {
      commit('SET_PARAMS', parmas)
      resolve(parmas)
    })
  },
  delParmas({ commit }) {
    commit('DEL_PARAMS')
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
